#! /bin/sh
# velan-cmp - Velocity analisys on CMP sorted data
# Copyright (C) 2010 Alam Souza CPGG/UFBA <aavbs@cpgg.ufba.br>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# input file
input="${HOME}/GeBR_examples/data/cdp-sorted.su"

# pick file generated
output="/tmp/tosco-ex-velan-cmp-picks.par"

# first cdp used
first=50

# interval between CDP's
step=50

# quantity of CDP's used
qt=2

# first velocity
first_vel=1500

# last velocity
last_vel=5000

# quantity
quant=10

# cvs size
cvs_size=11

# number of velocities, semblance
nv=50

# velocity increment, semblance
dv=50

# power, power of semblance
pwr=1

# strech mute, 1.5 = 150%
smute=1.5

# number of traces valid only to nccs, uccs, nsel and usel
nx=0

# distance between sucessives CDP's 
dx=1

# nsel, usel only, thresold for significance values
tau=0.4

# use suvelan or suvelan_nccs  suvelan_nsel  suvelan_uccs  suvelan_usel
plottype=suvelan

# percentile clip
perc=99

# temporary directory
TMPDIR=/tmp

./velan-cmp         \
  -i ${input}       \
  -p ${output}      \
  -c ${first}       \
  -d ${step}        \
  -n ${qt}          \
  -v ${first_vel}   \
  -V ${last_vel}    \
  -m ${quant}       \
  -s ${cvs_size}    \
  -k ${nv}          \
  -e ${pwr}         \
  -S ${smute}       \
  -N ${nx}          \
  -D ${dx}          \
  -U ${tau}         \
  -P ${plottype}    \
  -C ${perc}        \
  -T ${TMPDIR}
